package util;

import javax.swing.*;
import java.awt.*;

public class Util {
    /**
     * 工具类
     */
    public static int random(int max, int min) {
        return (int) (Math.random() * (max + 1 - min) + min);
    }

    public static Image getImage(String path){
        return new ImageIcon(Util.class.getResource(path)).getImage();
    }
    public static ImageIcon getIcon(String path){
        return new ImageIcon(Util.class.getResource(path));
    }
}
